package com.zut.blocks.web.controller;

import com.zut.blocks.service.course.CourseService;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.PostMapping;
import org.springframework.web.bind.annotation.RequestParam;
import org.springframework.web.bind.annotation.RestController;

@RestController()
public class CourseController {

    @Autowired
    CourseService us;

    @PostMapping(value = "/addCourse")
    public void addCourse(
            @RequestParam("teacherName") String teacherName,
            @RequestParam("courseName") String courseName){

        us.save(teacherName,courseName);
    }

}
